#include <stdio.h>
#include <queue>
#include <string.h>
#include <memory.h>

using namespace std;

int t, p[ 501 ], k[ 501 ][ 501 ], g[ 501 ], n;

struct cmp
{
    bool operator ( ) ( const int &i, const int &j )
    {
        return i > j;
    }
};

void topsort( )
{
    priority_queue<int, vector<int>, cmp> q;
    int i, v;
    for ( i = 1; i <= n; i++ )
        if ( p[ i ] == 0 )
            q.push( i );
    v = q.top( );
    q.pop( );
    printf("%d", v);
    for ( i = 1; i <= g[ v ]; i++ )
        if ( --p[ k[ v ][ i ] ] == 0 )
            q.push( k[ v ][ i ] );
    while ( !q.empty( ) )
    {
        v = q.top( );
        q.pop( );
        printf(" %d", v);
        for ( i = 1; i <= g[ v ]; i++ )
            if ( --p[ k[ v ][ i ] ] == 0 )
                q.push( k[ v ][ i ] );
    }
}

int get( char *s )
{
    int t2 = 0, len = strlen( s );
    for ( ; t < len; t++ )
        if ( s[ t ] >= '0' && s[ t ] <= '9' )
            t2 = t2 * 10 + s[ t ] - '0';
        else
            return t2;
    return t2;
}

int main( )
{
    int m, a, b, i, len;
    char s[ 10 ];
    bool space;
    while ( gets( s ) )
    {
        memset( g, 0, sizeof( g ) );
        t = 0;
        n = get( s );
        t++;
        m = get( s );
        for ( i = 1; i <= m; i++ )
        {
            t = 0;
            gets( s );
            a = get( s );
            t++;
            b = get( s );
            g[ a ]++;
            k[ a ][ g[ a ] ] = b;
            p[ b ]++;
        }
        topsort( );
        printf("\n");
    }
    return 0;
}
